package com.avecsys.quotemanager.pojos;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Sam Sundar K
 *
 */
public class QuoteTransactionPojo extends BasePojo implements Serializable
{
	private Long quoteId;

	private String quoteName;

	private SupplierMasterPojo supplierMasterPojo = new SupplierMasterPojo();

	private BuyerMasterPojo buyerMasterPojo = new BuyerMasterPojo();

	private String transactionStatus;

	private Set<QuoteTransactionEventsPojo> quoteTransactionEventsPojoSet = new HashSet<QuoteTransactionEventsPojo>(
			0);

	/**
	 * @return the buyerMasterPojo
	 */
	public BuyerMasterPojo getBuyerMasterPojo()
	{
		return buyerMasterPojo;
	}

	@Override
	public String getPkColumnName()
	{
		return "quoteId";
	}

	/**
	 * @return the quoteId
	 */
	public Long getQuoteId()
	{
		return quoteId;
	}

	/**
	 * @return the quoteName
	 */
	public String getQuoteName()
	{
		return quoteName;
	}

	/**
	 * @return the quoteTransactionEventsPojoSet
	 */
	public Set<QuoteTransactionEventsPojo> getQuoteTransactionEventsPojoSet()
	{
		return quoteTransactionEventsPojoSet;
	}

	/**
	 * @return the supplierMasterPojo
	 */
	public SupplierMasterPojo getSupplierMasterPojo()
	{
		return supplierMasterPojo;
	}

	/**
	 * @return the transactionStatus
	 */
	public String getTransactionStatus()
	{
		return transactionStatus;
	}

	@Override
	public boolean isPersisted()
	{
		if (quoteId == null || quoteId.intValue() == 0)
		{
			return false;
		}
		else
		{
			return true;
		}
	}

	/**
	 * @param buyerMasterPojo the buyerMasterPojo to set
	 */
	public void setBuyerMasterPojo(BuyerMasterPojo buyerMasterPojo)
	{
		this.buyerMasterPojo = buyerMasterPojo;
	}

	/**
	 * @param quoteId the quoteId to set
	 */
	public void setQuoteId(Long quoteId)
	{
		this.quoteId = quoteId;
	}

	/**
	 * @param quoteName the quoteName to set
	 */
	public void setQuoteName(String quoteName)
	{
		this.quoteName = quoteName;
	}

	/**
	 * @param quoteTransactionEventsPojoSet the quoteTransactionEventsPojoSet to set
	 */
	public void setQuoteTransactionEventsPojoSet(
			Set<QuoteTransactionEventsPojo> quoteTransactionEventsPojoSet)
	{
		this.quoteTransactionEventsPojoSet = quoteTransactionEventsPojoSet;
	}

	/**
	 * @param supplierMasterPojo the supplierMasterPojo to set
	 */
	public void setSupplierMasterPojo(SupplierMasterPojo supplierMasterPojo)
	{
		this.supplierMasterPojo = supplierMasterPojo;
	}

	/**
	 * @param transactionStatus the transactionStatus to set
	 */
	public void setTransactionStatus(String transactionStatus)
	{
		this.transactionStatus = transactionStatus;
	}
}
